<?php defined("MAIN_DIR") or die("No direct access");

$today = get_rates(date("Y-m-d"));
$yestarday = get_rates(date("Y-m-d",time()-86400));

$head_title = "Курсы валют в ".$current_city['city_name_pred'].", курс доллара, курс евро от ЦБ РФ";
$head_description = "Актуальные курсы основных валют";
$head_keywords = "курс доллара евро ".$current_city['city_name'];

require_once APP.HEADFILE;
?>
<script type="text/javascript" src="/files/js/bank_list.js"></script>
<h1>Курсы валют</h1>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td align="left" valign="top" class="banki_main_col">
			Сегодня, <?php echo date("j")." ".$months[date("m")-1];?>, рубль <?php
			echo $today['dollar'] > $yestarday['dollar'] ? "падает" : ($today['dollar'] < $yestarday['dollar'] ? "растет" : "не изменяется");
			?> по отношению к доллару и <?php
			echo $today['euro'] > $yestarday['euro'] ? "падает" : ($today['euro'] < $yestarday['euro'] ? "растет" : "не изменяется");
			?> по отношению к евро
			<div class="curency_segodnya">Курс Центрального Банка России следующий:</div> 
			<div><strong>1 доллар</strong> = <?php echo number_format($today['dollar'],2)?> рублей</div>
			<div class="curency_euro"><strong>1 евро</strong> = <?php echo number_format($today['euro'],2)?> рублей</div>
		</td>
		<td width="218" align="left" valign="top"><?php
			include_once "rating_column.php";
			include_once "vacancy_column.php";
		?></td>
	</tr>
</table>
<div class="inside_block">
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="344" class="inside_info"><?php
				include "bank_list.php";
				include "currency_rates.php";
			?></td>
			<td width="646"><?php
				$info = mysql_fetch_array(mysql_query("select * from `info` where `info_id` = '5' limit 1"));
				$text = getRichText($info['text']);
				echo "<h2>$info[header]</h2>";
				echo "<p>$text</p>";
			?></td>
		</tr>
	</table>
</div>
<?php require_once APP.FOOTERFILE; ?>